package com.veryGood.controller;

import com.veryGood.common.result.R;
import com.veryGood.domain.dto.LoginDto;
import com.veryGood.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LoginController {

    @Autowired
    private LoginService loginService;

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    @ResponseBody
    public R login(@RequestBody LoginDto logindto){
       // System.out.println(">>>>>>>>>"+logindto.getUserPwd());
        return loginService.login(logindto);
    }
}

